package com.zlc.big_event.pojo;



import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;

import java.time.LocalDateTime;

@lombok.Data
@lombok.ToString
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
public class User {
    @NotNull
    private Integer id;//主键ID
    private String username;//用户名
    @JsonIgnore //忽略 在进行JSON序列化或反序列化时忽略标记了该注解的字段或方法
    private String password;//密码
    @NotEmpty
    @Pattern(regexp = "^[a-zA-Z0-9_-]{3,16}$",message = "昵称格式不正确")
    private String nickname;//昵称
    @Email
    @NotEmpty
    private String email;//邮箱
    private String userPic;//用户头像地址
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//更新时间
}
